-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Remix documentation #86
base: main
Are you sure you want to change the base?
Conversation
|
Remix_Documentation/Remix.md
Outdated
npm install opentelemetry-instrumentation-remix | ||
``` | ||
|
||
#### Create tracing.js file in application folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to tell people how to run with 'tracing.js' file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah totally forgot, will add!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the back and forth. could we rename this tracing.js
to instrument.js
?
Remix_Documentation/Remix.md
Outdated
npm install @hyperdx/browser | ||
``` | ||
|
||
### Initialize HyperDX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to mention the file path for adding this code snippet ?
#### Using NPX | ||
|
||
```bash | ||
HYPERDX_API_KEY='<YOUR_HYPERDX_API_KEY>' OTEL_SERVICE_NAME='<YOUR_APP_NAME>' NODE_OPTIONS='-r <REALATIVE_TRACKING.JS_PATH>' remix dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also want to make sure this works with the command in prod env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this assume users have 'remix' cli installed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you guys already discussed this, but I'm wondering if it's better to just bundle remix into the default SDK setup so Remix users get a first-class experience as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just minor improvement suggestions
#### Using NPX | ||
|
||
```bash | ||
HYPERDX_API_KEY='<YOUR_HYPERDX_API_KEY>' OTEL_SERVICE_NAME='<YOUR_APP_NAME>' NODE_OPTIONS='-r <REALATIVE_TRACKING.JS_PATH>' remix dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you guys already discussed this, but I'm wondering if it's better to just bundle remix into the default SDK setup so Remix users get a first-class experience as well?
Remix_Documentation/Remix.md
Outdated
|
||
## (Optional) Use [opentelemetry-instrumentation-remix](https://github.com/justindsmith/opentelemetry-instrumentations-js/tree/main/packages/instrumentation-remix) package for Node.js servers. | ||
|
||
This will enable additional Remix specific spans. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to expand on what kind of spans (ex. what is being instrumented and/or what class of problems would that isntrumentation solve?). The statement as is, is a bit vague and wouldn't give me much info to make a decision whether this step is worth doing.
I think if it's possible for us to have a concise example of some benefits of enabling it, that'd be awesome. Or at the minimum perhaps just linking out to the event types in the docs.
npm install @hyperdx/browser | ||
``` | ||
|
||
### Initialize HyperDX in root.tsx file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be more appropriate in entry.client.tsx
?
Adding Remix documentation. Because Remix is mainly built off of React the implementation is fairly straight forward. Using the already built Browser package, we can mirror the implementation. I also added an extra section for Route Tracking based on the requests made in this issue (#68). It is also worth noting that Remix can use one of many backends (Express, Cloudflare Workers, Netlify, Vercel, Fastly, AWS, Deno, Azure, Fastify, Firebase, etc.). To this end I linked the Node.js documentation for use in Node.js servers.
I made sure to test this using the tutorial Remix project and cloud HyperDX.